#delimit ;
log using ~/parr/gaydata1.sta, replace;
infile 
lsumpol lpemp lacc lpvt leduc lhouse lcredit lunion ltask lelite ltrial
lcath lfund ldemo lsal lurb lwealth lcol lbar lbus lpaper lopen la wi
de ms lcomp rights ri
  using /home/gov/faculty/ppaolino/parr/gaydata1.asc; set more off;
regress lsumpol ltask lwealth lelite rights lcol wi la de; 
predict res, resid; 
hettest;
swilk res; 
swilk lsumpol; 
sktest res; 
sktest lsumpol;
regress lpemp ltask lwealth lelite rights lcol wi la de; 
predict rlpemp, resid;
predict plpemp, xb;
hettest; 
gen plpemp01=exp(plpemp)-1;
sum plpemp01;
swilk rlpemp; 
swilk lpemp; 
sktest rlpemp; 
sktest lpemp; 
regress lpvt ltask lwealth lelite rights lcol wi la de; 
predict rlpvt, resid; 
predict plpvt, xb; 
hettest;
swilk rlpvt; 
swilk lpvt; 
sktest rlpvt; 
sktest lpvt; 
regress lacc ltask lwealth lelite rights lcol wi la de; 
predict rlacc, resid;
predict placc, xb; 
hettest; 
swilk rlacc; 
swilk lacc; 
sktest rlacc; 
sktest lacc; 
regress leduc ltask lwealth lelite rights lcol wi la de; 
predict rleduc, resid; 
predict pleduc, xb; 
hettest;
swilk rleduc; 
swilk leduc; 
sktest rleduc; 
sktest leduc;
regress lhouse ltask lwealth lelite rights lcol wi la de; 
predict rlhouse, resid; 
predict plhouse, xb; 
hettest;
swilk rlhouse; 
swilk lhouse;
sktest rlhouse; 
sktest lhouse; 
regress lcredit ltask lwealth lelite rights lcol wi la de; 
predict rlcredit, resid; 
predict plcredit, xb;
hettest;
swilk rlcredit; 
swilk lcredit; 
sktest rlcredit; 
sktest lcredit;
regress lunion ltask lwealth lelite rights lcol wi la de; 
predict rlunion, resid; 
predict plunion, xb; 
hettest;
swilk rlunion; 
swilk lunion;
sktest rlunion; 
sktest lunion; 
gen sumpol=exp(lsumpol)-1; 
gen pemp=exp(lpemp)-1; 
gen pacc=exp(lacc)-1; 
gen pvt=exp(lpvt)-1; 
gen educ=exp(leduc)-1; 
gen house=exp(lhouse)-1; 
gen credit=exp(lcredit)-1;
gen union=exp(lunion)-1; 
gen task=exp(ltask); 
gen elite=(exp(lelite))/100; 
gen trial=exp(ltrial); 
gen cath=exp(lcath);
gen fund=exp(lfund); 
gen demo=exp(ldemo); 
gen sal=exp(lsal)-1; 
gen urb=exp(lurb); 
gen wealth=exp(lwealth)/100; 
gen col=exp(lcol); 
gen bar=exp(lbar); 
gen bus=(exp(lbus)-1)/10; 
gen paper=exp(lpaper); 
gen open=exp(lopen); 
gen comp=exp(lcomp); 
regress sumpol task wealth elite rights col wi la de; 
predict resu, resid; 
hettest;
swilk resu; 
swilk sumpol;
sktest resu; 
sktest sumpol; 
regress pemp task wealth rights elite col wi la de; 
predict rpemp, resid; 
hettest;
swilk rpemp; 
swilk pemp; 
sktest rpemp;
sktest pemp; 
regress pvt task rights elite sal col wi la de ri;
predict rpvt, resid; 
hettest;
swilk rpvt; 
swilk pvt; 
sktest rpvt; 
sktest pvt;
regress pacc task bus rights elite wi la; 
predict rpacc, resid; 
hettest;
swilk rpacc; 
swilk pacc; 
sktest rpacc; 
sktest pacc; 
regress educ task bus rights elite wi; 
predict reduc, resid; 
hettest;
swilk reduc; 
swilk educ; 
sktest reduc; 
sktest educ; 
regress house task wealth rights elite wi la;
predict rhouse, resid; 
hettest;
swilk rhouse; 
swilk house; 
sktest rhouse;
sktest house; 
regress credit task wealth rights elite wi; 
predict rcredit, resid; 
hettest;
swilk rcredit; 
swilk credit; 
sktest rcredit; 
sktest credit; 
regress union task wealth rights elite wi; 
predict runion, resid; 
hettest;
swilk runion; 
swilk union; 
sktest runion; 
sktest union; 
outfile pemp pvt pacc educ house
credit union task wealth bus rights elite
  col wi la de ri sal lsumpol lpemp lacc lpvt leduc lhouse lcredit lunion 
  ltask lelite ltrial lcath lfund ldemo lsal lurb lwealth lcol lbar lbus 
  lpaper lopen ms lcomp 
  using /home/gov/faculty/ppaolino/parr/gaydata1.raw, wide replace;
log close;